package com.mr.sell.service;

import com.mr.sell.dao.SellerInfoDao;
import com.mr.sell.entity.SellerInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Class: SellerInfoService
 * User (作者):MRui
 * TODO (描述)：卖家service
 * Date 2018.10.03 21:31
 */
@Service
public class SellerInfoService {

    @Autowired
    private SellerInfoDao sellerInfoDao;

    /**
    * User (作者): MRui
    * TODO (描述)：保存
    * Data：2018.10.03 21:33
    */
    public SellerInfo save(SellerInfo sellerInfo){
        sellerInfoDao.save(sellerInfo);
        return null;
    }

    /**
    * User (作者): MRui
    * TODO (描述)：根据openid获取卖家端信息
    * Data：2018.10.03 21:38
    */
    public SellerInfo findSellerInfoByOpenid(String openid){
        SellerInfo sellerInfo = sellerInfoDao.findByOpenId(openid);

        return sellerInfo;
    }

}
